Skip to content

feat: make this repository the wheels hub, with hatch-prebuilt 0.3 - #5

Merged
shenxianpeng merged 7 commits into
mainfrom
claude/project-thread-9eq513
Dec 1, 2026
Merged

shenxianpeng merged 7 commits into
mainfrom
claude/project-thread-9eq513

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

This repository becomes cpp-linter/wheels, the hub of the wheel repositories, the way deadsnakes/runbooks is for its version repositories. hatch-prebuilt stays the same package with the same releases; it moves to hatch-prebuilt/.

hatch-prebuilt 0.3 (hatch-prebuilt/)

  • A tool from the static binaries needs no hatch_build.py: pyproject.toml configures the recipe in [tool.hatch.metadata.hooks.prebuilt], and hatchling finds the hooks as the prebuilt plugin.
  • python -m hatch_prebuilt runs the recipe's commands for either kind of repository: update, versions, platforms, and new info (what CI needs, as JSON) and release-notes [VERSION] (the top of the GitHub release).
  • Version from the tags of this repository (raw-options = { root = ".." }); publish.yml builds from hatch-prebuilt/.

Shared workflows, moved here from cpp-linter/.github (the copies there stay until every wheel repository calls these):

  • binary-wheels.yml: inputs default from python -m hatch_prebuilt info; ends with All wheels pass, the one check a ruleset needs to require.
  • monitor-upstream.yml: the cpp-linter-publisher App opens the update pull request (so its CI runs) and turns on auto-merge, only when the branch rules require a check.
  • wheel-automation.yml (new): pre-commit and labels on pull requests, release draft and publish on main, update pull request and stale issues every day. It calls monitor-upstream.yml at its own commit, and the generic workflows in cpp-linter/.github (release-drafter.yml with publish: true needs feat: let release-drafter.yml publish the release of a new version .github#134).
  • wheel-release.yml: unchanged.

Runbooks (runbooks/): what the bot does and what a person still does: the one-time setup, a new wheel repository, packaging fixes, older versions, failed releases. runbooks/new-wheel.py <tool> writes a new repository from runbooks/templates/static-binaries-wheel/.

CI: besides hatch-prebuilt's tests, every pull request writes two wheel repositories with new-wheel.py (clang-query, and clang-tidy with headers in a package of another name), builds a wheel of each with hatch-prebuilt from the same commit and runs its smoke test. Both pass locally.

After merging

  1. Publish hatch-prebuilt 0.3.0 (the draft release, tag v0.3.0). The PyPI and TestPyPI trusted publishers must name the repository wheels.
  2. Merge feat: let release-drafter.yml publish the release of a new version .github#134.
  3. clang-include-cleaner-wheel#17 switches to hatch-prebuilt>=0.3,<1 and cpp-linter/wheels/...@main.

Related Issues

With cpp-linter/.github#134 and cpp-linter/clang-include-cleaner-wheel#17.

…atch_build.py

Register hatch-prebuilt as the hatchling plugin "prebuilt": a wheel
repository of a tool from the static binaries sets its tools in
[tool.hatch.metadata.hooks.prebuilt] and needs no hatch_build.py.
python -m hatch_prebuilt runs the recipe's commands (info, platforms,
versions, update) for either kind of repository, and info prints what
CI needs to build and test the wheels.
The repository becomes cpp-linter/wheels: hatch-prebuilt moves to
hatch-prebuilt/ (same package, same releases), and the shared parts of
the wheel repositories move here from cpp-linter/.github:

- binary-wheels.yml, wheel-release.yml and monitor-upstream.yml, with
  wheel-automation.yml, which runs everything else a wheel repository
  needs and calls monitor-upstream.yml at the same commit;
- runbooks/: what the publisher App does and what a person still does,
  and new-wheel.py with its templates.

Every pull request writes a wheel repository with new-wheel.py, builds a
wheel of it with hatch-prebuilt from the same commit and runs its smoke
test.
@shenxianpeng shenxianpeng changed the title feat: configure a static binaries recipe in pyproject.toml feat: make this repository the wheels hub, with hatch-prebuilt 0.3 Dec 1, 2026
…PI is ready

monitor-upstream.yml writes only the version file again when a caller gives no update-command and the recipe is not a static binaries one, and the update pull request no longer promises to merge itself when auto-merge is off. new-wheel.py escapes the summary for pyproject.toml and tells how to finish pinning in the written directory; new-wheel.md builds in the new repository and pushes after the PyPI publishers and the App; the template's smoke test checks the real PATH.
@shenxianpeng shenxianpeng added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Dec 1, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Dec 1, 2026
@shenxianpeng
shenxianpeng merged commit 04f3d93 into main Dec 1, 2026
21 of 22 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-9eq513 branch December 1, 2026 20:41
@shenxianpeng shenxianpeng removed the documentation Improvements or additions to documentation label Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant